package com.activiti.workflow.listener;

import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;

/**
 * task Listeners中的class类型,在.bpmn中填写：类全路径
 */
/*
<userTask activiti:exclusive="true" id="UserTask_2" name="创建出差申请">
    <extensionElements>
        <activiti:taskListener class="com.activiti.workflow.listener.ClassTaskListener" event="create"/>
    </extensionElements>
</userTask>
 */
@Slf4j
public class ClassTaskListener implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        System.out.println("-------- ClassTaskListener --------");
        delegateTask.setAssignee("张三88");
    }
}
